% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ejscreenit_for_ejam.R
\name{ejscreenapi2ejam_format}
\alias{ejscreenapi2ejam_format}
\title{EJAM/EJSCREEN comparisons - Convert output of ejscreenapi_plus to format of ejamit table of sites}
\usage{
ejscreenapi2ejam_format(
  ejscreenapi_plus_out,
  fillmissingcolumns = FALSE,
  ejamcolnames = NULL
)
}
\arguments{
\item{ejscreenapi_plus_out}{results of ejscreenapi_plus() or also
could be results of ejscreenit()$table even though the colnames differ,
because they get converted here in that case.
Alternatively also can be the whole list output of ejscreenit()
not just ejscreenit()$table, which this function will figure out.}

\item{fillmissingcolumns}{optional. set to TRUE if you want the output
to have exactly all the same columns as the EJAM table would, and
fill in with NA values all the columns not provided by EJScreen API.}

\item{ejamcolnames}{optional. if specified as vector of colnames, it
overrides the assumed colnames that would have been taken to be
colnames(testoutput_ejamit_10pts_1miles$results_bysite).
Any colnames you specify here will be the colnames of the output
if fillmissingcolumns = TRUE, or else those not in names(ejscreenapi_plus_out)
will be omitted.}
}
\value{
A data.table not just data.frame, with some or all of the columns
found in output of ejamit()$results_bysite
}
\description{
Used by \code{\link[=ejscreenit_for_ejam]{ejscreenit_for_ejam()}} to make it easier to compare EJScreen and EJAM results
}
\examples{
\dontrun{
  y1 <- ejscreenit_for_ejam(testpoints_10[1:2, ], radius = 1)

   x <- ejscreenapi_plus(testpoints_10[1:2, ], radius = 1)
   y <- ejscreenapi2ejam_format(x)
   ejamvars <- names(testoutput_ejamit_10pts_1miles$results_bysite)
   all.equal(
     names(y), 
     ejamvars[ejamvars \%in\% names(y)]
  )
  
  z <- ejscreenapi2ejam_format(x, fillmissingcolumns = T)
  all.equal(names(z), ejamvars)
  
  # for convenience also can do this:
  x <- ejscreenapi2ejam_format()
  
  }
  
  
  
}
\seealso{
\code{\link[=ejscreenit_for_ejam]{ejscreenit_for_ejam()}} \code{\link[=ejscreen_vs_ejam]{ejscreen_vs_ejam()}}
}
